package com.cai.dao;


import com.cai.pojo.Permission;
import com.cai.pojo.Role;
import com.github.pagehelper.Page;

import java.util.List;
import java.util.Map;

public interface RoleDao {
   public Role findRoleById(Integer roleId);

   public List<Integer> findPermissionIdsByRoleId(Integer id);
   //分页查询权限
   public Page<Role> selectByCondition(String queryString);

    public List<Permission> findAll();

    //操作中间表
    public void setRoleAndPermission(Map<String, Integer> map);

    public void add(Role role);
    //编辑时清除关联关系;
    public void deleteAssociation(Integer id);
    public void edit(Role role);
    public void delete(Integer id);
}


